package com.erp.erp_mask.controller;

import com.erp.erp_mask.mapper.TOrderstateMapper;
import com.erp.erp_mask.service.TOrderstateService;
import com.erp.erp_mask.vo.Result;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
@RequestMapping("/state")
public class TOrderstateController {

    @Resource
    public TOrderstateService tOrderstateService;

    @GetMapping("/index")
    public ModelAndView index(){
        return new ModelAndView("/pro/orderState");
    }

    @GetMapping("/search")
    public Result search(){
        return Result.success(tOrderstateService.searchList());
    }

}
